/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.csource.manage.controller;

import com.icinfo.cloud.provider.punish.csource.manage.dto.CaseSourceDocumentRecordDelDto;
import com.icinfo.cloud.provider.punish.csource.manage.service.ICaseSourceDocumentRecordService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述: 案源文书记录表 case_source_document_record 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年08月15日
 */
@Slf4j
@RestController
@RequestMapping("/punish/csource/document/record")
public class CaseSourceDocumentRecordController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(CaseSourceDocumentRecordController.class);

    @Autowired
    private ICaseSourceDocumentRecordService caseSourceDocumentRecordService;

    /**
     * 【V1.0.0】描述：删除案源文书记录
     *
     * @param delDto 德尔dto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2022/08/18
     */
    @PostMapping("/delCaseSourceDocumentRecord")
    public Result<String> delCaseSourceDocumentRecord(@RequestBody @Validated CaseSourceDocumentRecordDelDto delDto) {
        int num=caseSourceDocumentRecordService.delCaseDocumentRecordInfo(delDto);
        if(num<1){
            Result.error("删除失败");
        }
        return Result.success("删除成功");
    }
}
